package javanet.listener;

import java.io.Serializable;
import java.lang.reflect.Method;

import javanet.context.JavaNETFacadeContext;

/**
 * @author Markus Holzer
 */
public class JavaNETCommunicationEvent implements Serializable {

	private static final long serialVersionUID = 1128263615677790208L;

	private JavaNETFacadeContext facadeContext;
	
	private Method methodToInvoke;
	
	private Object[] parameters;
	
	private Object returnValue;
	
	private Exception exception;
	
	public JavaNETCommunicationEvent() {
	}

	public JavaNETCommunicationEvent(JavaNETFacadeContext facadeContext,
			Method methodToInvoke, Object[] parameters) {
		super();
		this.facadeContext = facadeContext;
		this.methodToInvoke = methodToInvoke;
		this.parameters = parameters;
	}

	public JavaNETCommunicationEvent(JavaNETFacadeContext facadeContext,
			Method methodToInvoke, Object[] parameters, Object returnValue) {
		super();
		this.facadeContext = facadeContext;
		this.methodToInvoke = methodToInvoke;
		this.parameters = parameters;
		this.returnValue = returnValue;
	}

	public JavaNETFacadeContext getFacadeContext() {
		return facadeContext;
	}

	public void setFacadeContext(JavaNETFacadeContext facadeContext) {
		this.facadeContext = facadeContext;
	}

	public Method getMethodToInvoke() {
		return methodToInvoke;
	}

	public void setMethodToInvoke(Method methodToInvoke) {
		this.methodToInvoke = methodToInvoke;
	}

	public Object[] getParameters() {
		return parameters;
	}

	public void setParameters(Object[] parameters) {
		this.parameters = parameters;
	}

	public Object getReturnValue() {
		return returnValue;
	}

	public void setReturnValue(Object returnValue) {
		this.returnValue = returnValue;
	}

	public Exception getException() {
		return exception;
	}

	public void setException(Exception exception) {
		this.exception = exception;
	}
	
	
	
	
}
